/**
 * @file stream.h
 * @version 1.0
 * @date 2015-10-13
 */

#ifndef _HAVE_STREAM_H
#define _HAVE_STREAM_H

#include <stdint.h>
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

struct stream;
typedef struct stream stream_t;

stream_t *stream_new(void);
void stream_delete(stream_t *s);

ssize_t stream_write(stream_t *s, uint8_t *wbuf, size_t len);
ssize_t stream_read(stream_t *s, uint8_t *rbuf, size_t len);
#ifdef __cplusplus
}
#endif

#endif /* _HAVE_STREAM_H */
